<?php
/**
 * Created by PhpStorm.
 * User: 李一瑶
 * Date: 2018/6/28
 * Time: 15:54
 */
//统一返回格式
if (!function_exists('renderJson'))
{
    function renderJson($message, $data = null, $code = 500)
    {
        return response()->json([
            'data' => $data ?? null,
            'message' => $message ?? null,
            'code' => $code
        ],200,[],JSON_UNESCAPED_UNICODE);
    }
}